{# How conversations felt, scored by the sentiment job: the spread, the average, and the latest conversations that went badly. #} {% from "components/macros/layout.html" import card, chart_panel, stats_strip %} {% from "components/macros/feedback.html" import empty_state %}
{% if not enabled %} {{ empty_state("Sentiment scoring is off", "Set AI_SENTIMENT_ENABLED=true to score conversations.") }} {% elif not total %} {{ empty_state("Nothing scored yet", "Conversations are scored by the sentiment job after they go quiet.") }} {% else %} {{ stats_strip(figures, id="ai-sentiment-figures") }}
{{ chart_panel("ai-sentiment", "Sentiment", "doughnut", chart) }} {% call card("Recent negatives", id="ai-negatives") %} {% if negatives %} {% else %}

None lately.

{% endif %} {% endcall %}
{% endif %}